Homework Assignment Student Name: Print out the assignment sheet, check the exercises that you worked on, write down the time that you worked on the exercises. Return the filled out assignment sheet during the next lecture. Write down any questions that come to your mind. Try to answer them yourself, ask colleagues,... Post your questions and answers on the course's forum. Bring the interesting questions with you at the next course day and start a discussion about them. 1. Preparation (time taken: ) Download the source code from the book “Junit in Action” Book at http://www.manning.com/massol/ Source http://www.manning.com/catalog/view.php?book=massol&item=source Expand the source code on your hard disk (e.g. resulting into c:\junitbook\...) Expand the package accompanying the course (e.g. on c:\testing) Download a recent JDK Look e.g. at http://java.sun.com/j2se/1.4.2/download.html Install the JDK You may want to include the JAVA_HOME\bin directory into the CLASSPATH 2. Junit (time taken: ) Setup Junit See “Setting up Junit.pdf", pp. 11-15 of the book "Junit in Action" Write a test case See “TestCalculator3.java” and “Calculator.java” in the subdirectory “c:\junitbook\jumpstart” Execute the test case and understand what happens behind the scenes See “Executing a test.pdf”, pp. 33-37 of the book "Junit in Action" 3. Eclipse (time taken: ) Setup Eclipse See “Eclipse Quickstart.pdf”, pp. 341-345 of the book "Junit in Action" Download e.g. eclipse-platform-SDK-3.0-win32.zip and eclipse-JDT-SDK-3.0.zip Expand them on your hard disk (e.g. resulting into c:\eclipse\...) Write a test and the code See “TestCalculator3.java” and “Calculator.java” in the subdirectory “c:\junitbook\jumpstart” Execute the tests See “Running Tests from Eclipse.pdf”, pp. 112-115 of the book "Junit in Action" Alternatively you can import the existing projects from the book (at least from the directories c:\junitbook\repository c:\junitbook\jumpstart and c:\junitbook\sampling) change to the Java perspective (Window => Open Perspective => Other) right click on the TestCalculator3.java and select Run => Junit Test view the results on the Junit tab 4. Ant (time taken: ) Setup Ant See “Ant.pdf”, pp. 91-102 of the book "Junit in Action" Write a build file and the targets See “build-simple.xml” and “build.xml” in the subdirectory “c:\junitbook\sampling” Execute the targets and understand what happens behind the scenes See “Ant.pdf”, pp. 91-102 of the book "Junit in Action" 5. Maven (time taken: ) Setup Maven See “Maven.pdf”, pp. 102-112 of the book "Junit in Action" Generate a project file template and fill it See “build-simple.xml” and “build.xml” in the subdirectory “c:\junitbook\sampling” Execute the targets. See “Maven.pdf”, pp. 102-112 of the book "Junit in Action" Get to know which goals are available by executing "maven -g" Try the targets "test", "site" Look at the resulting project web page index.html in the .\target\docs directory Set MAVEN_HOME to the DOS8.3 version of the name (e.g. "C:\PROGRA~1\APACHE~1\MAVEN1~1.0" instead of "C:\Program Files\Apache Software Foundation\Maven 1.0") 6. FIT (time taken: ) Setup FIT Download via http://fit.c2.com/wiki.cgi?JavaDownloads Expand on your hard disk (e.g. resulting into C:\FIT\Release) Understand the basics Look at http://fit.c2.com/wiki.cgi?WhatsWhat Run the first tests Look at http://fit.c2.com/wiki.cgi?RunMeFirst Walk through the examples Look at http://fit.c2.com/wiki.cgi?ExampleTests And http://fit.c2.com/wiki.cgi?CalculatorExample Write a functional test case with FIT Execute the test 7. FitNesse (time taken: ) Setup FitNesse Download fitnesse from http://fitnesse.org/FitNesse.DownLoad Expand on your hard disk (e.g. resulting into C:\fitnesse) Get started, see http://fitnesse.org/FitNesse.GettingStarted Create an acceptance test (see CreateExampleAcceptanceTest.pdf) Understand how to write acceptance tests See http://fitnesse.org/FitNesse.WritingAcceptanceTests Understand how to group tests to suites See http://fitnesse.org/FitNesse.WritingAcceptanceTestSuites Walk through the Calculator example (http://fitnesse.org/FitNesseCalculator.FrontPage) 8. Black-Box Testing (time taken: ) Imagine that you are a member of the test team that has to perform functional tests for the shopping function of the Amazon.com web site (focus on shopping and not on browsing through the catalogue). Identify who the other members of the test team are (i.e. self-organize your test team!) Find all the functions to be tested (for shopping on Amazon.com) Find the associated factors for inputs and outputs Find the equivalence classes for the factors Select test values from the equivalence classes (possibly with boundary value analysis) Find a small (or even minimum) set of test cases that covers the identified functions and factors.